package com.lwz.proxy;

/**
 * 单例模式静态代理
 * @author liuwangzhen
 *
 */
public class HumenServiceProxy implements HumenService {
	
	private static HumenServiceProxy proxy = null;
	
	private HumenServiceProxy(){
		
	}
	
	public static synchronized HumenServiceProxy getInstance(){
		if(proxy==null){
			proxy = new HumenServiceProxy();
		}
		return proxy;
	}

	private HumenServiceImpl serviceImpl = new HumenServiceImpl();
	@Override
	public void waitor() {
		System.out.println("使用代理--waitor");
		serviceImpl.waitor();
	}

	@Override
	public void watering() {
		System.out.println("使用代理--watering");
		serviceImpl.watering();
	}

}
